<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
                xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
<h2>首页</h2>
<div th:if="session.loginUser==null">
    <a th:href="@{/tologin}">登录</a>
</div>
    <p th:text="${msg}"></p>
<div shiro:hasPermission="user:add">
    <hr>
    <a th:href="@{/user/add}">添加用户</a>
</div>
<div shiro:hasPermission="user:update">
    <hr>
    <a th:href="@{/user/update}">修改用户</a>
</div>
</body>
</html>